#include <stdio.h>

int n; //input data n

//digital number at position [0,len(n)-1] from right to left of n
char num_at_pos[10]; 

//counts array,frequency of each digital number
long long count[10];

long long pow10[11];

int main()
{
    pow10[0] = 1;
    for(int i = 1;i < 11; ++i) pow10[i] = pow10[i-1]*10;

    scanf("%d",&n); //read in n

    //separate each number and get the length of n
    int len = 0;
    int temp_n = n;
    while(temp_n)
    {
        num_at_pos[len] = temp_n%10;
        temp_n /= 10;
        ++len;
    }

    for(int i = 0;i < 10;++i) count[i] = 0; //initial the counts array

    //processing each position from left to right of n
    for(int i = len-1;i >= 0;--i) 
    {
        //for position [0,i),number 0~9 respective appears i*10^(i-1)*num_at_pos[i] timess
        for(int j = 0;j < 10;++j) 
        {
            count[j] += i*pow10[i-1]*num_at_pos[i];
        }

        //for position i, 0 ~ num_at_pos[i] appears 10^i times
        for(int j = 0;j < num_at_pos[i];++j)
        {
            count[j] += pow10[i];
        }

        //for position (i,len-1],num_at_pos[j] respectively appears (num_at_pos[i]+1)*10^itimes
        for(int j = len-1;j > i; --j)
        {
            int num = num_at_pos[j];
            count[num] += (num_at_pos[i]+1)*pow10[i];
        }
    }

    //pickup the very  number
    ++count[num_at_pos[0]];

    for(int i = 1;i < len;++i)
    {
        count[0] -= i*(pow10[len-i]-pow10[len-i-1]);
    }
    count[0] -= len;

    for(int i = 0;i < 10;++i)
    {
        printf("%lld\n",count[i]);
    }
    return 0;
}

